#ifndef BASECOMM_H
#define BASECOMM_H

#include <QObject>

class BaseComm : public QObject
{
    Q_OBJECT
public:
    explicit BaseComm(QObject *parent = nullptr):QObject(parent){}

    virtual ~BaseComm(){}

    // 初始化通信
    virtual bool initialize() = 0;

    // 发送数据
    virtual int sendData(const QByteArray& data) = 0;

    // 接收数据
    virtual int recvData(QByteArray& data) = 0;

    // 启动通信
    virtual bool start() = 0;

    // 停止通信
    virtual bool stop() = 0;

signals:

};

#endif // BASECOMM_H
